package com.dit.dao;

import com.dit.entity.UserLogin;
import com.dit.entity.UserLoginExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface UserLoginMapper {

	int countByExample(UserLoginExample example);

	int deleteByExample(UserLoginExample example);

	int deleteByPrimaryKey(String id);

	int insert(UserLogin record);

	int insertSelective(UserLogin record);

	List<UserLogin> selectByExample(UserLoginExample example);

	UserLogin selectByPrimaryKey(String id);

	int updateByExampleSelective(@Param("record") UserLogin record,
			@Param("example") UserLoginExample example);

	int updateByExample(@Param("record") UserLogin record,
			@Param("example") UserLoginExample example);

	int updateByPrimaryKeySelective(UserLogin record);

	int updateByPrimaryKey(UserLogin record);

	@Select("SELECT * FROM user_login WHERE USERNAME=#{uname} AND PASSWORD=#{pword}")
	@ResultMap(value = "BaseResultMap")
	UserLogin findByUsernameAndPassword(@Param("uname") String username,
			@Param("pword") String password);
}